<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:93:"C:\Users\Lenovo\Desktop\www\FlashCashMange\public/../application/home\view\coupon\toUser.html";i:1511841385;s:96:"C:\Users\Lenovo\Desktop\www\FlashCashMange\public/../application/home\view\..\common\master.html";i:1511853633;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="0">

    <title>FlashCash后台管理系统</title>
    <link rel="icon" href="__PUBLIC__/home/img/favicon.ico" type="image/x-icon"/>
    <!-- Bootstrap -->
    <link href="__PUBLIC__/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="__PUBLIC__/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- NProgress -->
    <link href="__PUBLIC__/vendors/nprogress/nprogress.css" rel="stylesheet">
    <!-- jQuery custom content scroller -->
    <link href="__PUBLIC__/vendors/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.min.css" rel="stylesheet"/>

    <!-- Custom Theme Style -->
    <link href="__PUBLIC__/build/css/custom.min.css" rel="stylesheet">
    <!--<link rel="stylesheet" href="__PUBLIC__/home/boostrap/css/bootstrap.min.css">-->
    <!--<link rel="stylesheet" href="__PUBLIC__/home/awesome/css/font-awesome.min.css">-->
    <link rel="stylesheet" href="__PUBLIC__/home/css/common.css">
    <!--<script src="__PUBLIC__/home/js/jquery.min.js"></script>-->
    <script src="__PUBLIC__/vendors/jquery/dist/jquery.min.js"></script>
    <!-- 引入样式 -->
    <!--<link rel="stylesheet" href="__PUBLIC__/home/css/ele.css">-->
    <!-- 引入组件库 -->
    <!--<script src="__PUBLIC__/home/js/element-ui.js"></script>-->

    
    <script src="__PUBLIC__/home/boostrap/js/bootstrap.min.js"></script>
    <script src="__PUBLIC__/home/js/common.js"></script>
    <script src="__PUBLIC__/home/js/vue.js"></script>
    <script src="__PUBLIC__/home/js/vue-axios.min.js"></script>
    <script src="__PUBLIC__/layer/layer.js"></script>
    <script type="text/javascript" src="__PUBLIC__/home/js/echarts.min.js"></script>
</head>


<body class="nav-md">
<div class="container body">
    <div class="main_container">
        <div class="col-md-3 left_col menu_fixed">
            <div class="left_col scroll-view">
                <div class="navbar nav_title" style="border: 0;">
                    <a href="<?php echo url('home/Dataanalyse/paymentAnalysis'); ?>" class="site_title">
                        <img width="40px" height="40px" src="__PUBLIC__/home/img/logoo.png" alt=""><span>FlashCash</span></a>
                </div>

                <div class="clearfix"></div>

                <!-- menu profile quick info -->
                <div class="profile clearfix">
                    <div class="profile_pic">
                        <img src="__PUBLIC__/home/img/admin.jpg" alt="..." class="img-circle profile_img">
                    </div>
                    <div class="profile_info">
                        <span>Welcome,</span>

                        <h2><?php echo session('username'); ?></h2>
                    </div>
                </div>
                <!-- /menu profile quick info -->

                <br/>

                <!-- sidebar menu -->
                <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
                    <div class="menu_section">
                        <ul class="nav side-menu">
                            <li><a <?php if($controller == 'User'): ?>style="color:deepskyblue"<?php endif; ?>><i class="fa fa-user-md"></i> 用户管理 <span class="fa fa-chevron-down"></span></a>
                                <ul class="nav child_menu">
                                    <li><a href="<?php echo URL('home/User/userList'); ?>">用户列表</a></li>
                                </ul>
                            </li>
                            <li><a <?php if($controller == 'Product'): ?>style="color:deepskyblue"<?php endif; ?>><i class="fa fa-user-md"></i> 产品管理 <span class="fa fa-chevron-down"></span></a>
                                <ul class="nav child_menu">
                                    <li><a href="<?php echo URL('home/Product/productList?type=list'); ?>">产品列表</a></li>
                                    <li><a href="<?php echo URL('home/Product/productAdd'); ?>">添加产品</a></li>
                                </ul>
                            </li>
                            <li><a <?php if($controller == 'Coupon'): ?>style="color:deepskyblue"<?php endif; ?>><i class="fa fa-user-md"></i> 优惠券管理 <span class="fa fa-chevron-down"></span></a>
                                <ul class="nav child_menu">
                                    <li><a href="<?php echo URL('home/Coupon/couponList'); ?>">优惠券列表</a></li>
                                    <li><a href="<?php echo URL('home/Coupon/CouponAdd'); ?>">添加优惠券</a></li>
                                    <li><a href="<?php echo URL('home/Coupon/toUser'); ?>">发放优惠券</a></li>
                                </ul>
                            </li>
                            <li><a <?php if($controller == 'User'): ?>style="color:deepskyblue"<?php endif; ?>><i class="fa fa-user-md"></i> 活动管理 <span class="fa fa-chevron-down"></span></a>
                                <ul class="nav child_menu">
                                    <li><a href="<?php echo URL('home/User/userList'); ?>">产品列表</a></li>
                                    <li><a href="<?php echo URL('home/User/userList'); ?>">优惠券列表</a></li>

                                </ul>
                            </li>
                            <li><a <?php if($controller == 'User'): ?>style="color:deepskyblue"<?php endif; ?>><i class="fa fa-user-md"></i> app配置 <span class="fa fa-chevron-down"></span></a>
                                <ul class="nav child_menu">
                                    <li><a href="<?php echo URL('home/User/userList'); ?>">产品列表</a></li>
                                    <li><a href="<?php echo URL('home/User/userList'); ?>">优惠券列表</a></li>
                                </ul>
                            </li>

                        <!--<li><a <?php if($controller == 'Metadata'): ?>style="color:deepskyblue"<?php endif; ?>><i class="fa fa-database"></i> 数据仓库 <span class="fa fa-chevron-down"></span></a>-->
                            <!--<ul class="nav child_menu">-->
                                <!--<li><a href="<?php echo URL('home/Metadata/index'); ?>">概览</a></li>-->
                                <!--<li><a href="<?php echo URL('home/Metadata/tabsearch'); ?>">表查询</a></li>-->
                                <!--<li><a href="JavaScript:;">元数据 <span class="fa fa-chevron-down"></span></a>-->
                                            <!--<ul class="nav child_menu">-->
                                                <!--<li class="sub_menu"><a href="<?php echo URL('home/Metadata/allsearch'); ?>">全局检索</a>-->
                                                <!--</li>-->
                                                <!--<li><a href="<?php echo URL('home/Metadata/myDataList'); ?>">权限分配</a>-->
                                                <!--</li>-->
                                            <!--</ul>-->
                                <!--</li>-->
                                <!--<li><a href="<?php echo URL('home/Metadata/etymasearch'); ?>">词根查询</a></li>-->
                                <!--<li><a href="<?php echo URL('home/Metadata/documentmanage'); ?>">文档管理</a></li>-->
                                <!--<li><a href="<?php echo URL('home/Metadata/announcement'); ?>">公告录入</a></li>-->
                                <!--<li><a href="<?php echo URL('home/Metadata/manWrite'); ?>">人工录入</a></li>-->
                            <!--</ul>-->
                        <!--</li>-->

                        </ul>
                    </div>
                </div>
                <!-- /sidebar menu -->
            </div>
        </div>

        <!-- top navigation -->
        <div class="top_nav">
            <div class="nav_menu" style="margin-bottom: 0px">
                <nav>
                    <div class="nav toggle">
                        <a id="menu_toggle"><i class="fa fa-bars"></i></a>
                    </div>
                    <div class="nav toggle plblic-notice">
                        <span><i class="fa fa-volume-up"></i>【公告】</span>
                        <div class="scroll-txt">
                            <ul class="font-inner" id="liName">
                                
                            </ul>
                            <!--<div class="dot">-->
                                <!--<a href="javascript:void(0)" class="lt"><</a>-->
                                <!--<a href="javascript:void(0)" class="gt">></a>-->
                            <!--</div>-->
                        </div>
                    </div>
                    <ul class="nav navbar-nav navbar-right" style="width:110px;">
                        <li class="">
                            <a href="<?php echo URL('home/index/loginOut'); ?>" class="user-profile dropdown-toggle"
                               aria-expanded="false">
                                <img src="__PUBLIC__/home/img/admin.jpg" alt="">退出
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
        </div>
        <!-- /top navigation -->

        <!-- page content -->
        <div class="right_col" style="height: auto;overflow: auto" role="main">
            <div class="" style="height: auto;overflow: auto">
                <div class="page-title" style="height: auto;overflow: auto">
                    
<div id="right">
       <h4 style="border-bottom: 1px solid #ccc;padding-bottom: 3px">发放记录    <a type="button" href="<?php echo URL('home/Coupon/couponToUser'); ?>" class="btn btn-success">新发优惠券</a></h4>
    <!--<form action="" method="post" role="form">-->
        <!--<div class="form-group">-->
            <!--<input type="text" style="width: 200px;float: left;margin-right: 20px" class="form-control" value="<?php if(isset($uname)): ?><?php echo $uname; endif; ?>" name="uname" id="" placeholder="上传名">-->
        <!--</div>-->
        <!--<button type="submit" class="btn btn-primary">查询</button>-->
        <!--<a href="<?php echo URL('home/Docmanager/docupload'); ?>" class="btn btn-success">上传文件</a>-->
    <!--</form>-->
    <table class="table-bordered table  table-hover" style="margin-top: 20px;">
        <thead>
        <tr>
            <th>序号</th>
            <th>发送的优惠券ID</th>
            <th>内容</th>
            <th>发放时间</th>
        </tr>
        </thead>
        <tbody>
        <?php if(is_array($data) || $data instanceof \think\Collection): if( count($data)==0 ) : echo "" ;else: foreach($data as $k=>$vo): ?>
            <tr>
                <th><?php echo $k+1; ?></th>
                <th><?php echo $vo['module_id']; ?></th>
                <th><?php echo $vo['content']; ?></th>
                <th><?php echo $vo['create_time']; ?></th>
                <th>
                    <div class="btn-group">
                        <a style="margin-left: 5px" href="<?php echo URL('home/Product/productList?type=info',['uid'=>$vo['id']]); ?>" class="btn btn-primary btn-sm">查看详情</a>
                    </div>
                </th>
            </tr>
        <?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
    </table>
    <?php echo $page; ?> 总发放数：<?php echo $totalCount; ?>

</div>
<script>
    $(".toStore").click(function(){
        var data={
            is_valid:1
        }
        var id=$(this).attr('uid');
        var url="<?php echo URL('home/Product/upStore'); ?>"+"?id="+id;
        $.post(url,data,function(res){
            if(res.code == 0){
                location.reload();
            }else{
                layer.msg(res.data,function(){});
            }
        })
    })
    $(".downStore").click(function(){
        var data={
            is_valid:0
        }
        var id=$(this).attr('uid');
        var url="<?php echo URL('home/Product/upStore'); ?>"+"?id="+id;
        $.post(url,data,function(res){
            if(res.code == 0){
                location.reload();
            }else{
                layer.msg(res.data,function(){});
            }
        })
    })
</script>

                </div>
            </div>
        </div>
        <!-- /page content -->

        <!-- footer content -->
        <!--<footer>-->
        <!--<div class="pull-right">-->
        <!--© 2016 Copyright 北京悦畅科技有限公司 版权所有 京ICP备12034557号-->
        <!--</div>-->
        <!--<div class="clearfix"></div>-->
        <!--</footer>-->
        <!-- /footer content -->
    </div>
</div>

<!-- jQuery -->

<!-- Bootstrap -->
<script src="__PUBLIC__/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="__PUBLIC__/vendors/fastclick/lib/fastclick.js"></script>
<!-- NProgress -->
<script src="__PUBLIC__/vendors/nprogress/nprogress.js"></script>
<!-- jQuery custom content scroller -->
<script src="__PUBLIC__/vendors/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js"></script>

<!-- Custom Theme Scripts -->
<script src="__PUBLIC__/build/js/custom.min.js"></script>


<script>
$(document).ready(function() {
    $.get("<?php echo URL('home/Interurl/mapad'); ?>",{ counts:10 },function(data){
        $.each($.parseJSON(data), function (index, obj) {
            var html ="";
            html='<li><a href="#">'+obj.content+'</a><span>'+obj.createTime+'</span></li>',
            $("#liName").append(html);
        });
        
        var index = 0;
        var autoTimer = 0;
        var clickEndFlag = true;
      
        var oInner = $(".font-inner");
        var oLi = $(".font-inner li");
        oLi.eq(0).clone(true).appendTo(oInner);
      
        var liHeight = $(".scroll-txt").height();
      
        function tab() {
            oInner.stop().animate({
                top: -index * liHeight
            }, 400, function() {
              clickEndFlag = true;
              if (index == oLi.length) {
                  oInner.css({
                    top: 0
                  });
                  index = 0;
              }
            })
        }  
        function next() {
            index++;
            tab();
            clearInterval(autoTimer);
            autoTimer = setInterval(next, 2000);
        }
        function prev() {
            index--;
            if (index < 0) {
                index = oLi.size() - 1;
                oInner.css("top", -oLi.size() * liHeight);
            }
            tab();
            clearInterval(autoTimer);
            autoTimer = setInterval(next, 2000);
        }
      
        $(".scroll-txt").on("click", '.gt',function () {
            if (clickEndFlag) {
                next();
                clickEndFlag = false;
            }
        });
      
        $(".scroll-txt ").on("click",'.lt', function () {
            if (clickEndFlag) {
                prev();
                clickEndFlag = false;
            }
        });
      
      autoTimer = setInterval(next, 2000);
      
      $(".font-inner a").hover(function() {
            clearInterval(autoTimer);
      }, function() {
            autoTimer = setInterval(next, 2000);
      });
      
      $(".scroll-txt .lt,.scroll-txt .gt").hover(function() {
            clearInterval(autoTimer);
      }, function() {
            autoTimer = setInterval(next, 2000);
      });

    },'json');
});    
</script>
</body>
</html>